#include <iostream>
#include <string>
using namespace std;

class Car
{
private:
    string m_sign;
    string m_country;
    float m_price;
    float m_length;
    float m_width;
public:
    Car();
public:
    void log();
    Car(string m_sign, string m_country, float m_price, float m_length, float width) : m_sign(m_sign), m_country(m_country), m_price(m_price), m_length(m_length), m_width(width) {log();}
    Car(const Car &C): m_sign(C.m_sign),m_country(C.m_country),m_price(C.m_price),m_length(C.m_length),m_width(C.m_width){
        cout << "拷贝构造函数被调用" << endl;
        log();
    }
};

void Car::log()
{
    cout << "该车品牌是" << m_sign << endl;
    cout << "该车生产于" << m_country << endl;
    cout << "该车价格是" << m_price << " 万元" << endl;
    cout << "该车长度为" << m_length << " m" << endl;
    cout << "该车宽度为" << m_width << " m" << endl << endl;
}

Car::Car()
{
    m_sign = "Benz";
    m_country = "德国";
    m_price = 93.8;
    m_length = 5.3;
    m_width = 2.0;
    log();
}


int main()
{
    Car C1;
    Car C2("Toyota", "日本", 8.58, 4.16, 1.7);
    Car C3(C2);
}